package com.yunang.officialweb.common;

import lombok.Getter;

/**
 * @author 周
 */

@Getter
@SuppressWarnings("AlibabaEnumConstantsMustHaveComment")
public enum RCodeEnum {
    SUCCESS(200, "成功"),
    FAIL(201, "失败"),
    PARAM_ERROR(202, "参数不正确"),
    SERVICE_ERROR(203, "服务异常"),
    DATA_ERROR(204, "数据异常"),
    DATA_UPDATE_ERROR(205, "数据版本异常"),

   LOGIN_AUTH(208, "未登陆"),
    PERMISSION(209, "没有权限"),

   CODE_ERROR(210, "验证码错误"),
    LOGIN_ACCOUNT_ERROR(211, "账号不正确"),
   LOGIN_DISABLED_ERROR(212, "改用户已被禁用"),
    REGISTER_ACCOUNT_ERROR(213, "账号已存在"),
   LOGIN_AUTH_NEEDED(214, "需要登录"),
   LOGIN_NO_PERMISSIONS(215, "没有权限"),

   URL_ENCODE_ERROR(216, "URL编码失败"),
    ILLEGAL_CALLBACK_REQUEST_ERROR(217, "非法回调请求"),
   FETCH_ACCESS_TOKEN_FAILED(218, "获取accessToken失败"),
    FETCH_USER_INFO_ERROR(219, "获取用户信息失败");

    private Integer code;
    private String message;

    RCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
